Improving Mergesort for Linked Lists
نویسنده
چکیده
We present a highly tuned mergesort algorithm that improves the cost bounds when used to sort linked lists of elements. We provide empirical comparisons of our algorithm with other mergesort algorithms. The paper also illustrates the sort of techniques that allow to speed a divide-and-conquer algorithm.
منابع مشابه
Efficient Mergesort
We provide a formalization of the mergesort algorithm as used in GHC’s Data.List module, proving correctness and stability. Furthermore, experimental data suggests that generated (Haskell-)code for this algorithm is much faster than for previous algorithms available in the Isabelle distribution. theory Efficient-Sort imports ∼∼/src/HOL/Library/Multiset begin A high-level overview of this formal...
متن کاملA Rule-Based, Integrated Modelling Approach for Object-Oriented Systems
In this paper an integrated modelling approach for object-oriented systems is proposed. The integrated language consists of three layers. On the first layer UML class diagrams are used to define the structure of the modelled systems and OCL expressions specify queries, which do not modify the object configuration. On the second layer transformation rules model local state modifications of the s...
متن کاملMellin Transforms and Asymptotics The Mergesort Recurrence
Mellin transforms and Dirichlet series are useful in quantifying periodicity phe nomena present in recursive divide and conquer algorithms This note illustrates the tech niques by providing a precise analysis of the standard top down recursive mergesort algo rithm in the average case as well as in the worst and best cases It also derives the variance and shows that the cost of mergesort has a G...
متن کاملMinimal Mergesort
We present a new adaptive sorting algorithm, called minimal merge sort, which merges the ascending runs in the input list from shorter to longer, that is, merging the shortest two lists each time. We show that this algorithm is optimal with respect to the new measure of presortedness, called entropy.
متن کاملA Formalisation of Smallfoot in HOL
In this paper a general framework for separation logic inside the HOL theorem prover is presented. This framework is based on Abstract Separation Logic. It contains a model of an abstract, imperative programming language as well as an abstract specification logic for this language. While the formalisation mainly follows the original definition of Abstract Separation Logic, it contains some addi...
متن کامل